import { Middleware } from "redux";
import i18n from "i18next"
import { CHANGE_LANGUAGE } from '../language/languageActions'
export const languageLog: Middleware = store => next => action => {
  if (action.type === CHANGE_LANGUAGE) {
    i18n.changeLanguage(action.payload) // 这样处理不标准，有副作用
  }
  next(action)
}